MODULE modA
    IMPLICIT NONE
    
    CONTAINS
    
! This function adds two numbers: c = b + a   
    SUBROUTINE add(a,b,c)
        IMPLICIT NONE
        REAL*8, INTENT(IN)  :: a    ! 1st argument
        REAL*8, INTENT(IN)  :: b    ! 2nd argument
        REAL*8, INTENT(OUT) :: c    ! result
        
        c = b + a
        
    END SUBROUTINE add



! This function subtracts two numbers: c = b - a
    SUBROUTINE minus(a,b,c)
        IMPLICIT NONE
        REAL*8, INTENT(IN)  :: a    ! 1st argument
        REAL*8, INTENT(IN)  :: b    ! 2nd argument
        REAL*8, INTENT(OUT) :: c    ! result
        
        c = b - a
        
    END SUBROUTINE minus

END MODULE modA